﻿using SmartParking.Server.EFCore;
using SmartParking.Server.IConfiguration;
using SmartParking.Server.IEFContext;

namespace SmartParking.Server.EFContext
{
    public class EFContext : IEFContext.IEFContext
    {
        private readonly IConfiguration.IConfiguration _configuration;

        public EFContext(IConfiguration.IConfiguration configuration)
        {
            this._configuration = configuration;
        }
        public EFCoreContext CreateDBContext()
        {
            return new EFCoreContext(_configuration.Read("DBConnectStr"));
        }
    }
}
